package cn.jhc.teachingquality.net;

import android.content.Context;

import com.android.volley.Request;
import com.android.volley.RequestQueue;
import com.android.volley.toolbox.Volley;

/**
 * Created by luyanfei on 16-3-6.
 */
public class RequestQueueFactory {
    private static RequestQueue requestQueue;

    public static synchronized RequestQueue getRequestQueue(Context context){
        if(requestQueue == null){
            requestQueue = Volley.newRequestQueue(context.getApplicationContext());
        }
        return requestQueue;
    }

//    public static <T> void addToRequestQueue(Request<T> request) {
//        requestQueue.add(request);
//    }
}
